package sniff.pack;

import java.util.Date;

public class CommonPacket {
	protected int no;
	protected String sourceMAC;
	protected String destinationMAC;
	protected String type;
	protected int lenght;
	protected String info;
	protected byte[] head;
	protected byte[] data;
	protected Date date;
	
	public CommonPacket() {
		date = new Date();
	}
	
	public CommonPacket(String sourceMAC, String destinationMAC, String type, int lenght, String info,byte[] head,byte[] data) {
		this();
		this.sourceMAC = sourceMAC;
		this.destinationMAC = destinationMAC;
		this.type = type;
		this.lenght = lenght;
		this.info = info;
		this.head=head;
		this.data = data;
	}
	public int getNo() {
		return no;
	}
	public void setNo(int no) {
		this.no = no;
	}
	public String getSourceMAC() {
		return sourceMAC;
	}
	public void setSourceMAC(String sourceMAC) {
		this.sourceMAC = sourceMAC;
	}
	public String getDestinationMAC() {
		return destinationMAC;
	}
	public void setDestinationMAC(String destinationMAC) {
		this.destinationMAC = destinationMAC;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public int getLenght() {
		return lenght;
	}
	public void setLenght(int lenght) {
		this.lenght = lenght;
	}
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	
	public byte[] getHead() {
		return head;
	}

	public void setHead(byte[] head) {
		this.head = head;
	}

	public byte[] getData() {
		return data;
	}

	public void setData(byte[] data) {
		this.data = data;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("DestinationMAC:"+this.destinationMAC+"\n");
		sb.append("SourceMAC:"+this.sourceMAC+"\n");
		sb.append("Type:"+this.type+"\n");
		return sb.toString();
	}

}
